Skip to content

docs: fix stale file references and statuses - #5292

Open
MasamiYui wants to merge 1 commit into
apache:mainfrom
MasamiYui:docs/fix-stale-references
Open

MasamiYui wants to merge 1 commit into
apache:mainfrom
MasamiYui:docs/fix-stale-references

Conversation

@MasamiYui

Copy link
Copy Markdown
Member

Summary

Four places in the current (non-archive) documentation point at things that no longer exist or describe a status that is no longer true:

  • SECURITY.md §2 and §4 cited apps/desktop/src/main/__tests__/web-search-boundary.test.ts and claude-subscription-ipc-boundary.test.ts as the contract tests for the main→renderer token boundary. Both were deleted in test: improve test suite signal quality #1851. The section now names the tests that enforce it today: settings-ipc-helpers.test.ts (Tavily and bot credentials) and runtime-host-connections-ipc-main.test.ts (Connection credentials, including OAuth subscriptions and custom headers).
  • ARCHITECTURE.md reading paths described the Desktop conversation projection as "proposed … not yet implemented", while the linked docs/architecture/desktop-conversation-host-projection.zh-CN.md opens with 状态:已实施. Wording updated to match.
  • ARCHITECTURE.zh-CN.md was missing that reading-path entry entirely (the one Chinese-only document was absent from the Chinese index). Added, keeping the two editions in step.
  • docs/tui-live-ctx-updates.md still read Status: design after feat(cli): refresh the statusline ctx segment per settled provider request (#4545) #4550 shipped packages/cli/src/tui-context-refresh.ts and wired it into pi-tui-runner.ts; it also referenced session-trace-refresh.ts at its pre-move path. Status now says implemented and the path points at features/workbar/tools/inspector/.

No code changes.

Verification

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code — scanned the docs for stale paths/statuses, verified each against git log and the current tree, and drafted the edits. Commit carries a Generated-by: Claude Code trailer.

Checklist

  • Tests cover the change and fail without it — not applicable (documentation only)
  • Lint, format, typecheck and the affected suites pass locally — no source files touched; link check clean

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

- SECURITY.md pointed at `web-search-boundary.test.ts` and
  `claude-subscription-ipc-boundary.test.ts`, both deleted in apache#1851; name
  the tests that enforce the IPC token boundary today.
- ARCHITECTURE.md described the Desktop conversation projection as "not yet
  implemented" while the linked document states it is implemented; the
  Chinese edition was also missing that reading-path entry.
- docs/tui-live-ctx-updates.md still said "Status: design" after apache#4550
  shipped `tui-context-refresh.ts`, and referenced `session-trace-refresh.ts`
  at its pre-move path.

Generated-by: Claude Code
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 14, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up — the core premise checks out. I verified each claim against the PR's base (bf6e9422), and the deleted tests, the projection status, and the "implemented" status are all real. Two things worth a look before merge, plus two nits.

Verified

  • SECURITY.md test swaps are sound. web-search-boundary.test.ts and claude-subscription-ipc-boundary.test.ts are indeed gone at base. The replacements exist and cover what's claimed:
    • settings-ipc-helpers.test.ts — L31 ("masks sensitive bot fields before returning settings to renderer") and L53/L84 (Tavily key never revealed to renderer, incl. the save response). Covers "Tavily and bot credentials". ✅
    • runtime-host-connections-ipc-main.test.ts — L435 "keeps saved custom header values out of the renderer". Covers "custom headers". ✅
  • Projection statusdocs/architecture/desktop-conversation-host-projection.zh-CN.md:22 does open with 状态:已实施, so the old "not yet implemented" wording was wrong and ARCHITECTURE.md:80 is now accurate.
  • Edition parity — adding the ARCHITECTURE.zh-CN.md:80 entry does bring the two editions to the same set of reading-path links (9 each). I confirmed no other entry is missing on either side.
  • TUI statuspackages/cli/src/tui-context-refresh.ts exists at base and is imported at pi-tui-runner.ts:142, so "implemented" is correct.
  • Links — all 9 relative Markdown links and every fully-qualified backticked source path in the four touched files resolve against the base tree. No broken links introduced.

Findings

1. SECURITY.md:213 attributes OAuth-subscription coverage to the wrong test file.
The parenthetical says runtime-host-connections-ipc-main.test.ts covers Connection credentials "(including OAuth subscriptions and custom headers)". The custom-header half is right (L435), but that file contains zero occurrences of subscription or oauth (grep -icE 'subscription|oauth' → 0; its 17 tests cover provider-type validation, onboarding save/delete, hasSecret, request headers, catalog projection). The OAuth/subscription IPC boundary is enforced by apps/desktop/src/main/__tests__/runtime-host-oauth-ipc-main.test.ts (115 oauth/subscription hits, e.g. L40 "presents the Host OAuth handoff without exposing the authorization URL"). Since this is the document a reporter is pointed at for what counts as an enforced boundary, I'd either add that file to the §4 list (SECURITY.md:267-268) or trim the parenthetical to just "custom headers" — otherwise §4 under-lists the contract tests for the token boundary.

2. Both paths fixed in row 9 are already stale on main (not your fault, but the fix won't survive the merge).
Relative to the base this is exactly right — features/workbar/tools/inspector/session-trace-refresh.ts exists at bf6e9422 and the old renderer/session-trace-refresh.ts does not. But #5345 (0d9ea7576, merged Sep 15, already on origin/main) moved the session-inspector files out of that directory:

  • session-trace-refresh.tsapps/desktop/src/renderer/application/contracts/session-inspector/session-trace-refresh.ts
  • use-session-trace.tsapps/desktop/src/renderer/application/contracts/session-inspector/use-session-trace.ts

So docs/tui-live-ctx-updates.md:53 will point at two nonexistent files the moment this lands. Worth a rebase (or a quick follow-up) rather than merging as-is — otherwise the PR ships a path fix that's stale on arrival.

Nits

  • SECURITY.md:211 gives the full path for the first test but a bare basename for the second (runtime-host-connections-ipc-main.test.ts), while §4 (:267-268) uses the full path for both. Minor inconsistency, and the bare form isn't greppable/clickable. Consider using the full path in both places.
  • docs/tui-live-ctx-updates.md:53 attributes TRACE_REFRESH_DEBOUNCE_MS = 400 to use-session-trace.ts L59. At base that constant is actually defined at session-trace-refresh.ts:23; use-session-trace.ts only imports it (L36) and uses it at L302/L308. Pre-existing, but since you were already editing this row's paths it's a cheap fix while you're in there.

No behavior change, and nothing here blocks the direction of the PR — thanks again for catching the two deleted SECURITY.md tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants